class CreateSignRecords < ActiveRecord::Migration
  def self.up
    create_table :sign_records do |t|
      t.boolean  :action    #1=login  0=logout
      t.string   :ip    #record ip address
      t.string    :username   #record username if not regisered in site
      t.integer   :user_id  #refers to user
      t.boolean  :result    #1=success 0=failure
      t.timestamps
    end
  end

  def self.down
    drop_table :sign_records
  end
end
